using System;

using Microsoft.VisualStudio.TestTools.UITesting;
using Microsoft.VisualStudio.TestTools.UITesting.WinControls;

namespace CodeStream.Testing.WebAutomation.InternetExplorer
{
    internal class UIDevWindow : WinWindow
    {
        private readonly Lazy<UIDevMenu> m_toolBar;
        private readonly Lazy<UIDevTitleBar> m_titleBar;

        public UIDevWindow(UITestControl searchLimitContainer)
            : base(searchLimitContainer)
        {
            SearchProperties[WinWindow.PropertyNames.ClassName] = "IEDEVTOOLS";

            m_toolBar = new Lazy<UIDevMenu>(new Func<UIDevMenu>(() => new UIDevMenu(this)));
            m_titleBar = new Lazy<UIDevTitleBar>(new Func<UIDevTitleBar>(() => new UIDevTitleBar(this)));
        }

        public UIDevMenu Menu
        {
            get { return m_toolBar.Value; }
        }

        public UIDevTitleBar TitleBar
        {
            get { return m_titleBar.Value; }
        }
    }
}
